<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FlyGreenwich's Aircraft</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<%
if(session.getAttribute("admin_id")== null || session.getAttribute("admin_id").equals("")){
%>
window.location = "http://localhost:8080/FlyGreenwichAirline/admin/login.jsp";
<%}%>

function validate(){
	
	if(document.getElementById("adminUsername").value.length==0){
		alert("Please key in the username. ");
		return false;
	}else if(document.getElementById("adminPassword").value.length==0){
		alert("Please key in the password. ");
		return false;
	}else{
		return true;
	}
}

</script>
</head>
<body>
<a name="top" id="top"></a>
<center>
	<jsp:include page="/WEB-INF/pages/admin_menu.jsp"></jsp:include>
	<jsp:include page="/WEB-INF/pages/header.jsp"></jsp:include>
	<jsp:include page="/WEB-INF/pages/admin_content.jsp"></jsp:include>
	<jsp:include page="/WEB-INF/pages/admin_sidebar.jsp"></jsp:include>
	<div id="mainbar">
		<h1><a name="css" id="css"></a>Add User</h1>
		<form id="adduser" action="addUserServlet" name="adduser" method="post" onsubmit="return validate()">
			<table>
				<tr>
					<td>Username :</td>
					<td><input type="text" name="adminUsername" id="adminUsername"/></td>
				</tr>
				<tr>
					<td>Password :</td>
					<td><input type="password" name="adminPassword" id="adminPassword"/></td>
				</tr>
				<tr>
					<td colspan="2"><input type="submit" value="Add"/></td>
				</tr>
			</table>
		</form>
    </div>
    <br><br><br><br><br><br><br><br><br><br>
	<jsp:include page="/WEB-INF/pages/footer.jsp"></jsp:include>
</center>
</body>
</html>
